#ifndef CHAT_H
#define CHAT_H

#include <QWidget>
#include <QCloseEvent>
#include <qmessagebox.h>
#include <socktooler.h>
#include <createmymsg.h>
#include "heartbtimer.h"
#include "login.h"
#include "btn_user.h"
#include <QButtonGroup>
namespace Ui {
class Chat;
}

class Chat : public QWidget
{
    Q_OBJECT

public:
    explicit Chat(QWidget *parent = 0);
    ~Chat();

private slots:
    void on_btn_sendmsg_clicked();

//    void on_btn_exit_clicked();

    void DealMsgComing(string from, string content);
    void DealHeartBRSP(string content);

private:
    Ui::Chat *ui;
    HeartBTimer *hb_timer;
    void refresh();
    map<string, int> live;
    QButtonGroup btngroup_user;
};

#endif // CHAT_H
